/*
 * @Author: YYJ
 * @Date: 2023-12-16 14:40:39
 * @Description: 
 * @FilePath: \lgd-admin\src\services\system\user\index.tsx
 */
import { MenuDataItem } from '@ant-design/pro-components';
import { request } from '@umijs/max';

/** 查询当前用户 POST /admin/sysUser/currentUser */
export async function currentUser(options?: { [key: string]: any }) {
    return request<API.LgdResult>('/admin/systemUser/currentUser', {
      ...(options || {}),
    });
}

/** 查询当前菜 POST /admin/sysUser/currentMenu */
export async function currentMenu(options?: { [key: string]: any }) {
  return request<MenuDataItem[]>('/admin/systemUser/currentMenu', {
    ...(options || {}),
  });
}

/** 系统用户登录 POST /admin/user/login */
export async function login(body: API.LoginReq) {
  return request<API.LgdResult>('/admin/systemUser/login', {
    method: 'POST',
    data: body
  });
}